<template>
	<div class="header">
		<div class="headerdiv">
			<img src="../../assets/logo2.png" />
			<span>菜谱后台管理系统</span>
		</div>
		<el-button type="info" @click="loginOut">退出</el-button>
	</div>
</template>

<script>
export default {
  data () {
    return { // 默认高亮导航条选项
      //	activeIndex2: '2'
    }
  },
  mounted () { // 页面渲染后  对应点击导航条选项高亮
    // this.activeIndex2 = this.$store.getters.getPage; //对应store/index.js
  },
  // 退出登陆按钮
  methods: {
    loginOut () {
      window.sessionStorage.clear()
      this.$router.push('/login')// 重定向到登陆页
    }
  }
}
</script>
<style>
	/*头部*/
    .header{
		 background-color: #373d41;
		 display: flex;
		 justify-content: space-between;
		 padding-left: 0;
		 align-items: center;
		 color: #fff;
		 font-size: 20px;
	 }
	.headerdiv {
		display: flex;
		align-items: center;
	}
	.headerdiv span {
		margin-left: 15px;
	}
	.headerdiv img{
	      width:80px;
		  height:60px;
	}

</style>
